package cn.sinjet.viewmodel;

import com.mgroup.wazehelper.R;

import cn.sinjet.sinjetui.data.PropBase;
import cn.sinjet.sinjetui.data.PropControlItem;
import cn.sinjet.sinjetui.data.PropImageView;
import cn.sinjet.sinjetui.data.PropMeterView;
import cn.sinjet.sinjetui.data.PropRadioButton;
import cn.sinjet.sinjetui.data.PropScanCarView;
import cn.sinjet.sinjetui.data.PropTextButton;
import cn.sinjet.sinjetui.data.PropTextView;

public class ViewDefine {
	public static final int VIEW_APPS_LIST = 0x10000;
	
    public static PropBase newPropById(int id){
    	PropBase prop = null;
    	switch(id){
    	case R.id.about_back:
    		prop = new PropBase();
    		break;
    	case R.id.obd_discription_text_chinese_name:
    	case R.id.obd_discription_text_english_name:
    	case R.id.obd_discription_text_text_obd_explain:
    	case R.id.obd_discription_text_obd_about:
    /*	case R.id.start_point:
    	case R.id.set_end_point:
    	case R.id.true_navi:*/
    	case R.id.app_version:
    	case R.id.meter_time:
    	case R.id.home_bt_status_text:
    	case R.id.home_gps_status_text:
    	case R.id.meter_speed_value:
    	case R.id.obd_discription_title:
    	case R.id.meter_voltage_value:
    	case R.id.meter_temp_value:
    	case R.id.meter_direction_value:
    		
    	case R.id.system_power_supply_value:
    	case R.id.system_air_intake_value:
    	case R.id.system_idling_value:
    	case R.id.system_cooling_value:
    	case R.id.system_memissions_value:
    	case R.id.car_condiction_title:
    	case R.id.car_condiction_subtitle:
    	case R.id.normal_range_value:
    	case R.id.current_value:
    	case R.id.car_condiction_knowledge:
    	case R.id.err_count_value:
    	case R.id.car_vin_code_value:
    	case R.id.car_obd_type_value:
    	case R.id.err_detected_count:
    		
    	case R.id.tpms_lf_status:
    	case R.id.tpms_lr_status:
    	case R.id.tpms_rf_status:
    	case R.id.tpms_rr_status:
    	case R.id.tpms_lf_tire_pressure:
    	case R.id.tpms_lr_tire_pressure:
    	case R.id.tpms_rf_tire_pressure:
    	case R.id.tpms_rr_tire_pressure:
    	case R.id.tpms_lf_temperature:
    	case R.id.tpms_lr_temperature:
    	case R.id.tpms_rf_temperature:
    	case R.id.tpms_rr_temperature:
    		
    	case R.id.navi_set_day_night_mode_value:
    	case R.id.mcu_version:
    	case R.id.home_music_artist:
    	case R.id.home_music_title:
    	case R.id.car_control_hint:
    	case R.id.meter_rotate_value:
    	case R.id.meter_gear:
    	case R.id.meter_mileage_value:
    	case R.id.meter_gas_value:
    	case R.id.meter_limit_speed:
//    	case R.id.debug_text:
    	    prop = new PropTextView();
    	    break;
    	case R.id.tpms_lf_pair:
    	case R.id.tpms_rf_pair:
    	case R.id.tpms_lr_pair:
    	case R.id.tpms_rr_pair:
    	case R.id.tpms_enter_pair:
    		prop = new PropTextButton();
    	    break;
    	case R.id.bt_auto_open:
    	case R.id.gps_auto_open:
    	case R.id.keep_screen_on:
    	case R.id.navi_set_traffic_voice:
    	case R.id.navi_set_navi_voice:
    	case R.id.navi_strategy_avoid_highspeed:
    	case R.id.navi_strategy_congestion:
    	case R.id.navi_strategy_cost:
    	case R.id.navi_strategy_highspeed:
    	case R.id.gear_d_lock_onoff:
    	case R.id.gear_p_unlock_onoff:
    	case R.id.temperature_voice_on:
    	case R.id.voltage_voice_on:
    	case R.id.tpms_voice_on:
    	case R.id.handbrake_voice_on:
    	case R.id.seatbelt_voice_on:
    	case R.id.doors_voice_on:
    		prop = new PropRadioButton();
    		break;
    		
    	case R.id.home_bt_status_img:
    	case R.id.home_gps_status_img:
//    	case R.id.bt_status_map:
    	case R.id.car_condition_img_result:
    	case R.id.radar_front_left:
    	case R.id.radar_front_left_mid:
    	case R.id.radar_front_right_mid:
    	case R.id.radar_front_right:
    	case R.id.radar_rear_left:
    	case R.id.radar_rear_left_mid:
    	case R.id.radar_rear_right_mid:
    	case R.id.radar_rear_right:
    	case R.id.waze_connect_state:
    		prop = new PropImageView();
    		break;
//    	case R.id.meter_rotate_meter:
    	case R.id.meter_speed_meter:
    		prop = new PropMeterView();
    		break;
    	case R.id.scan_car_view:
    		prop = new PropScanCarView();
    		break;
    	case R.id.car_window_close:
    	case R.id.car_window_open:
    	case R.id.car_lock:
    	case R.id.car_unlock:
    	case R.id.car_power_on:
    	case R.id.car_power_off:
    	case R.id.car_trunk_open:
    	case R.id.car_skylight_open:
    		prop = new PropControlItem();
    		break;
    	default:
    		prop = new PropBase();
    		break;
    	}
		return prop;
    }
}
